package com.leyou.item.mapper;

import com.leyou.item.entity.TbCategory;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.idlist.SelectByIdListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface CategoryMapper extends Mapper<TbCategory>, SelectByIdListMapper<TbCategory,Long> {

    @Select("select * from tb_category where id in (select category_id from tb_category_brand where brand_id=#{id})")
    List<TbCategory> queryCategoryByBrandId(Long id);


}
